{include file="common/head"/}
<style>
  .aui-bar-nav{background:white;}
  .aui-bar-nav .aui-btn .aui-iconfont{color:black;}
  body{background:#ffffff;}
  .aui-bar-nav .aui-title{color:black;}
  h1{font-weight:600;font-size:2rem;color:#17204d}
  .title{background:#EBEBEB; height:5rem;border-radius:10px;padding:10px;color:white;line-height:2rem;}
  .title p{font-size:0.8rem;}
  .title p:nth-child(1){color:#E34540}
  .title p:nth-child(1) span{font-size:1.2rem;font-weight:bold;}
 
  .t_content{background:#4871FC;border-radius:5px;height:4rem;padding:10px;box-sizing:border-box;}
  .team p{color:white;}
  h2{font-weight:bold;margin:10px 0;}

  .accu p{white-space:nowrap;}
  .accu div{line-height:2rem;}
  .accu div div{box-shadow: 0px 2px 12px #dedede;
    border-radius: 5px;
    margin: 6px;
    padding: 5px 10px;}
  
  .aui-col-xs-4{color:black;font-weight:bold;}
  .aui-col-xs-12{margin:5px 0}
</style>
<title>Add To</title>
<body>
   <header class="aui-bar aui-bar-nav">
    <a class="aui-pull-left aui-btn aui-btn-outlined" href='javascript:history.go(-1);'>
        <span class="aui-iconfont aui-icon-left"></span>
    </a>
    <div class="aui-title"></div>
    <a class="aui-pull-right aui-btn aui-btn-outlined"  href='index.html'>
        <span class="aui-iconfont aui-icon-home"></span>
    </a>
  </header>
<div class='aui-content aui-content-padded'>
  <h1>Add to</h1>
  
 
 <div class='aui-row aui-row-padded accu'>
     
     <div class='aui-col-xs-12'>
	    <div class='aui-row'>
	     <p class='aui-col-xs-4'>姓名</p>
	     <p class='aui-col-xs-8'><input type='text' id='username' placeholder='请输入您的姓名' /></p>
		</div>
	 </div>
	 
	 <div class='aui-col-xs-12'>
	    <div class='aui-row'>
	     <p class='aui-col-xs-4'>提币地址</p>
	     <p class='aui-col-xs-8'><input type='text' id='no' placeholder='请输入您的卡号' /></p>
		</div>
	 </div>
	 
	 <div class='aui-col-xs-12'>
	    <div class='aui-row'>
	     <p class='aui-col-xs-4'>所属银行</p>
	     <p class='aui-col-xs-8'>
		   <input type='text' id='title' placeholder='请输入您卡片的银行' />
		 </p>
		</div>
	 </div>
	 
	 <div class='aui-col-xs-12'>
	    <div class='aui-row'>
	     <p class='aui-col-xs-4'>开户行</p>
	     <p class='aui-col-xs-8'><input type='text' id='address' placeholder='请输入您开户行地址' /></p>
		</div>
	 </div>
 </div> 
   <div class='aui-row' align=center >
	  <div class="aui-btn aui-btn-block aui-btn-info" onclick='submit()' style='width:80%'>确认添加</div>
  </div>
  <div style='margin-top:10px;line-height:30px;padding:10px;'>
     提示：请仔细核对务必保证您输入的信息正确，如因个人原因造成的包括但不限于（提币失败、提币至他人帐户）等问题平台不承担一切责任！
  </div>
</div>
{include file="common/footer"/}
<script type="text/javascript">
    var dialog = new auiDialog({})
    var toast = new auiToast({})
	function submit(){
	    if($("#username").val() ==''){toast.fail({title:"请输入姓名",duration:1000});}
	    if($("#no").val() ==''){toast.fail({title:"请输入您的卡号",duration:1000});}
	    if($("#title").val() ==''){toast.fail({title:"请输入您卡片的银行",duration:1000});}
	    if($("#address").val() ==''){
		    toast.fail({title:"请输入您开户行地址",duration:1000});
	    }else{
		    $.post('{:url("add_to")}', {'username':$('#username').val(),'no':$('#no').val(),'title':$('#title').val(),'address':$('#address').val()}, function(data){
			    if(data == 1){
				    dialog.alert({title:"提示",msg:'添加成功',buttons:['确定']},function(ret){
					    location.href = '{:url("home/Mcenter/address")}';
					})
				}else{
				    dialog.alert({title:"提示",msg:'添加失败，请稍后重试!',buttons:['确定']},function(ret){
					})
				}
			})
		}
		
	}
</script>
</body>
</html>